package com.cssy.base.web;

import java.util.HashMap;
import java.util.Map;
/**
 * 消息处理类
 * @author silver
 *
 */
public class BodyMsg {
	
	public  Map<String, Object> modelMap;
	
	
	public static BodyMsg getInstance(){
		return new BodyMsg();
	}
	
	public BodyMsg(){
		modelMap = new HashMap<String, Object>(4);
	}
	public void  configWebInfor(String msg){
		modelMap.put("infor", msg);
	}
	public void  configWebId(String id){
		modelMap.put("id", id);
	}
	public void  isSuccess(){
		modelMap.put("success", "true");
	}
	public void  isSuccess(String msg){
		modelMap.put("success", "true");
		modelMap.put("infor", msg);
	}
	public void  isFail(){
		modelMap.put("success", "false");
	}
	public void  isFail(String msg){
		modelMap.put("success", "false");
		modelMap.put("infor", msg);
	}
	
	public void configWebCode(String code){
		modelMap.put("code", code);
	}
}

